<?php

class postInstTask extends sfBaseTask
{
  protected function configure()
  {

    $this->namespace        = 'wixet';
    $this->name             = 'post-instalation';
    $this->briefDescription = 'Post instalation tasks';
    
  }

  protected function execute($arguments = array(), $options = array())
  {
  	
  	$databaseManager = new sfDatabaseManager($this->configuration);
  	
  	$con = Doctrine_Manager::getInstance()->connection();
	$con->execute("DROP TABLE search_profile");
	
	$view = "create or replace view search_profile ".
			"as ".
 			"SELECT user_id,gender,uid,birthday,city_id,country_id,town_id FROM profile";
	$con->execute($view);
	
	
	$this->log("Post instalation tasks done");
  }
}
